-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
qt5: fix cross #264965
qt5: fix cross #264965
Conversation
]; | ||
|
||
# TODO: figure out why the env hooks aren't adding these inclusions automatically |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only the /include
is added , not any sub paths IIRC
Many of the includes in https://github.com/search?q=%2F%23Include.%2BQtWebChannel%2F&type=code have a / so I don't know if they're supposed to be added to it.
@ofborg build pkgsCross.aarch64-multiplatform.qt5.qutebrowser |
…ldInputs if cross compiling
@ofborg eval |
This works; along with #264964:
It causes no rebuilds: There are a lot of conditionals; most can be removed, but doing so causes rebuilds, so the conditional-removals must go to staging. I'm incredibly tired of rebasing this. I'm merging it. Maybe somebody will rage-revert it, maybe not. In either case I'll stay on the branch (local if necessary) that keeps it in-tree, because it's kind of insane to use a distribution with a browser-only forge that repeatedly breaks your web browser. If I can stop spending all my time rebasing this I might actually be able to finish getting qt6 to cross-compile after 23.11:
|
Why did you neither implement my suggestion nor wait for other reviews? |
This is possibly the most self-aware yet utterly absurd comment I've seen here to date. A gentle reminder that we are a team, and you are expected to work with others to meet our shared goals; completely blindsiding the active reviewers goes against that entirely. |
(args.nativeBuildInputs or []) ++ [ | ||
perl qmake | ||
] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ | ||
pkgsHostTarget.qt5.qtbase.dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why a buildInput in nativeBuildInputs, the programs there shouldn't be executable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normally no, except it's QT, and QT has both qmake
-which-runs-on-the-buildPlatform as well as libQtBase
-which-is-built-for-the-hostPlatform mashed into the same package.
propagatedBuildInputs = [ qtbase.dev ]; | ||
${if stdenv.buildPlatform == stdenv.hostPlatform | ||
then "propagatedBuildInputs" | ||
else "depsTargetTargetPropagated"} = [ qtbase.dev ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems wrong, the binaries in qtbase won't be in PATH
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remember, qtbase
is both a build tool (qmake
) and a library (libQt5Base
). The line above deals with the library.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure it deals with only the library? https://github.com/nixos/nixpkgs/blob/753bf0e2933c4d66c0eb8481b60157419bae3629/pkgs/development/libraries/qt-5/hooks/qmake-hook.sh#L37
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I> Normally no, except it's QT, and QT has both qmake-which-runs-on-the-buildPlatform as well as libQtBase-which-is-built-for-the-hostPlatform mashed into the same package.
Gotta add comments, really confusing
github removed all my nixpkgs notifications and unsubscribed me from all the nixpkgs PRs and issues (4k+) 😠 so ping directly in other PRs which i haven't been in since ~ https://discourse.nixos.org/t/github-unsubscribed-me-from-all-nixpkgs-prs-and-issues/35026 |
You sneaked controversial changes (the qutebrowser stuff) in an unrelated PR and self-merged them without waiting for anyone to review. I think this behavior is borderline malicious and I seriously suggest that your commit rights be revoked. |
At least the merged change didn't make it so that any usage of |
I think you are confused here. It was in fact you who sneaked controversial changes to qutebrowser in #250171 which deleted |
Who, besides you, agrees that the upgrade to qt6 was controversial? Certainly not upstream. In fact, it is often considered controversial to break from upstream packaging norms in any serious manner, which means you have the burden of proof here, not us. In addition, I think most users were anxious for the qt6 version, seeing as the qt5 webengine was already severely outdated by the time qt6 support was made stable in qutebrowser. I would bet that there would be a much larger popullation of confused users if qt6 wasn't made the default as soon as it was stable. Besides that, it is just plain subversive to sneak in changes like this when maintainers don't agree with you, especially if you don't take a share of the maintenance burden by adding yourself as a maintainer. |
Please don't put words in my mouth. Take a moment to read the PR that I linked to. Before that PR qutebrowser supported both qt5 and qt6. I have no objection to the addition of support for qt6. |
if stdenv.buildPlatform == stdenv.hostPlatform | ||
then bootstrapScope.qttranslations | ||
else null; | ||
qutebrowser = final.callPackage ../../../../applications/networking/browsers/qutebrowser { }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applications don't belong here so I suggest #251671.
Reengineered to avoid rebuilding anything. Should have ~0 rebuilds.
To be useful, you also need this two-commit PR from staging (which does cause rebuilds; that's why it's a separate PR):
Description of changes
This commit fixes builds of
pkgsCross.*.qt5.qtbase
by:Adding the buildPlatform compiler to depsBuildBuild in qtbase.nix and qtModule.nix. The
qtbase
build machinery expects to find it in the $PATH in unprefixed form.Setting the
PKG_CONFIG_SYSROOT_DIR
andPKG_CONFIG_LIBDIR
environment variables when compiling a cross-targetedqmake
. This is required; if these environment variables are unset,qmake
won't even try to usepkg-config
.Adding the
-device
and-device-option
flags necessary for cross compilation toconfigureFlags
.Adding the (one-entry at the moment) Rosetta Stone for QT-5 as a
let
-definedqtPlatform
function which takes a nixpkgs platform and returns a QT-5mkspecs
-string.Includes
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)